package com.ht.common.core.domain.vo;

import com.ht.common.core.utils.StringUtils;

/**
 * 实体转下来列表字典
 * @author Administrator
 *
 */
public class EntitySelectVo {
	private String value;
	private String label;
	private String extVal1;
	private String extVal2;
	private String extVal3;
	
	
	
	public EntitySelectVo() {
		super();
	}
	public EntitySelectVo(String value, String label) {
		super();
		this.value = value;
		this.label = label;
	}
	public EntitySelectVo(String value, String label,String extVal1) {
		super();
		this.value = value;
		this.label = label;
		this.extVal1=extVal1;
	}
	
	public  static EntitySelectVo toEntitySelectVo(String value, String label,String ...extVals) {
		EntitySelectVo esv=new EntitySelectVo();
		esv.value = value;
		esv.label = label;
		if(StringUtils.isNotEmpty(extVals)){
			if(extVals.length>=3){
				esv.extVal1=extVals[0];
				esv.extVal2=extVals[1];
				esv.extVal3=extVals[2];
			}else if(extVals.length==2){
				esv.extVal1=extVals[0];
				esv.extVal2=extVals[1];
			}if(extVals.length==1){
				esv.extVal1=extVals[0];
			}
		}
		return esv;
	}
	
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getLabel() {
		return label;
	}
	public void setLabel(String label) {
		this.label = label;
	}
	
	public String getExtVal1() {
		return extVal1;
	}
	public void setExtVal1(String extVal1) {
		this.extVal1 = extVal1;
	}
	public String getExtVal2() {
		return extVal2;
	}
	public void setExtVal2(String extVal2) {
		this.extVal2 = extVal2;
	}
	public String getExtVal3() {
		return extVal3;
	}
	public void setExtVal3(String extVal3) {
		this.extVal3 = extVal3;
	}
	@Override
	public String toString() {
		return "EntitySelectVo [value=" + value + ", label=" + label + "]";
	}
	
	
}
